<%@page import="model.bean.TourKind"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type = "text/css">
.contain{
height: 500px;
padding-top: 60px;
}
.contain>input {
padding: 5px 5px 5px 5px;
}
#main{
float:left;
margin-left:100px;
overflow: hidden;
width:350px;
height: auto;
border: 1px solid #AC8853;
border-radius:5px;
}
.bag {
overflow: hidden;
height:auto;
}
#main *{
border-radius:5px;
border-color: #AC8853;
font-style: oblique;
font-family: Serif;
}
#main .lb {
width: 100px;
display:block;
float:left;
margin: 3px 3px 3px 3px;
line-height: 25px;
}
#main .ip {
width: 220px;
display:block;
float:left;
margin: 3px 3px 3px 3px;
line-height: 25px;
}
#main .send {
width: 100px;
display:block;
float:left;
margin: 3px 3px 3px 3px;
line-height: 25px;
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Edit Tour</title>
</head>
<body>
<jsp:include page="common/header.jsp"></jsp:include>
<div id="page-wrapper">
	<h3>Edit Tour</h3>
	<div class = "contain">
	  <div id = "main">
		<form method = "post" action = "${pageContext.request.contextPath}/TourUpdateServlet">
		<div class = "bag"><label class = "lb">Tên Tour Mẫu: </label><input class = "ip" id = "tourTempName" type = "text" name = "tourTempName" class = "required" /></div>
		<div class = "bag"><label class = "lb">Loại Tour:</label><select class = "ip" name = "tourKind" >
			<%
				ArrayList<TourKind> tourKind = null;
				tourKind = (ArrayList<TourKind>) 
							request.getAttribute("tourKind");
				if(tourKind != null) {
					for(int i = 0; i <tourKind.size(); i++){
			%>
				<option value = "<%= tourKind.get(i).getKindIndex() %>"><%=tourKind.get(i).getKindName() %></option>
				<%} 
			}%>
			</select></div>
			<div class = "bag"><label class = "lb">Giá tham khảo: </label> <input class = "ip" type = "text" name = "tourPrice" /></div>
			<div class = "bag"><label class = "lb">Tần suất: </label><input class = "ip" type = "number" name = "usual" min = "0" max = "15" /></div>
			<div class = "bag"><input type = "hidden" name = "tourId" value = "<%=request.getParameter("id")%>"/></div>
			<div class = "bag"><input class = "send" type = "submit" id = "process" name = "process" value = "Change"></div>
		</form>
	   </div>
	</div>
</div>
<jsp:include page="common/footer.jsp"></jsp:include>
</body>
</html>